package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.VContactResultsApplicationMapper;
import com.ruoyi.system.domain.VContactResultsApplication;
import com.ruoyi.system.service.IVContactResultsApplicationService;
import com.ruoyi.common.core.text.Convert;

/**
 * 基础2问题数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-15
 */
@Service
public class VContactResultsApplicationServiceImpl implements IVContactResultsApplicationService 
{
    @Autowired
    private VContactResultsApplicationMapper vContactResultsApplicationMapper;

    /**
     * 查询基础2问题数据
     * 
     * @param contactId 基础2问题数据主键
     * @return 基础2问题数据
     */
    @Override
    public VContactResultsApplication selectVContactResultsApplicationByContactId(Long contactId)
    {
        return vContactResultsApplicationMapper.selectVContactResultsApplicationByContactId(contactId);
    }

    /**
     * 查询基础2问题数据列表
     * 
     * @param vContactResultsApplication 基础2问题数据
     * @return 基础2问题数据
     */
    @Override
    public List<VContactResultsApplication> selectVContactResultsApplicationList(VContactResultsApplication vContactResultsApplication)
    {
        return vContactResultsApplicationMapper.selectVContactResultsApplicationList(vContactResultsApplication);
    }

    /**
     * 新增基础2问题数据
     * 
     * @param vContactResultsApplication 基础2问题数据
     * @return 结果
     */
    @Override
    public int insertVContactResultsApplication(VContactResultsApplication vContactResultsApplication)
    {
        vContactResultsApplication.setCreateTime(DateUtils.getNowDate());
        return vContactResultsApplicationMapper.insertVContactResultsApplication(vContactResultsApplication);
    }

    /**
     * 修改基础2问题数据
     * 
     * @param vContactResultsApplication 基础2问题数据
     * @return 结果
     */
    @Override
    public int updateVContactResultsApplication(VContactResultsApplication vContactResultsApplication)
    {
        vContactResultsApplication.setUpdateTime(DateUtils.getNowDate());
        return vContactResultsApplicationMapper.updateVContactResultsApplication(vContactResultsApplication);
    }

    /**
     * 批量删除基础2问题数据
     * 
     * @param contactIds 需要删除的基础2问题数据主键
     * @return 结果
     */
    @Override
    public int deleteVContactResultsApplicationByContactIds(String contactIds)
    {
        return vContactResultsApplicationMapper.deleteVContactResultsApplicationByContactIds(Convert.toStrArray(contactIds));
    }

    /**
     * 删除基础2问题数据信息
     * 
     * @param contactId 基础2问题数据主键
     * @return 结果
     */
    @Override
    public int deleteVContactResultsApplicationByContactId(Long contactId)
    {
        return vContactResultsApplicationMapper.deleteVContactResultsApplicationByContactId(contactId);
    }
}
